﻿using SSAT.Forms;
using SSAT.Utils;

namespace SSAT.Commands
{
    internal sealed class AuthentificationTroubleshooterRunCommand : CommandBase
    {
        private readonly MainForm _form;

        public override string DisplayName
        {
            get
            {
                return CommandsResources.AuthentificationTroubleshooterRunCommandDisplayName;
            }
        }

        public AuthentificationTroubleshooterRunCommand(MainForm form)
        {
            Verification.CheckArgumentForNull(form, "form");
            _form = form;
        }

        public override void Execute()
        {
            if (_form != null)
            {
                _form.FetchAuthentificationInfo();
            }
        }
    }
}
